import { reactive, effect, targetMap, ref, computed } from '@vue/vue'
const obj = {
  name: '章三',
  age: 20,
  data: {
    val: ''
  }
}
const a = reactive(obj)
const total = computed(() => a.age * 10)
// effect(() => {
//   console.log(a.data.val)
// })
// effect(() => {
//   console.log(a.name)
// })
// console.log(targetMap)
// a.name = '李四'
effect(() => {
  console.log(total.value)
})
setTimeout(() => {
  a.age = 200
}, 2000)
// const val = ref(0)
// effect(() => {
//   console.log(val.value)
// })
// val.value++
// console.log(val.value)
